﻿
using System;
using System.Collections.Generic;
using System.Linq;
using Inovout.Linq;

namespace Inovout.Data.Domain
{
    public class QueryCriteria
    {
        public QueryCriteria()
        {
        }
        public QueryCriteria(Type modelType)
        {
            this.ModelType = modelType;
        }
        public QueryCriteria(IEnumerable<FilterCriteria> filters, IEnumerable<OrderCriteria> orders)
        {
            this.Filters.AddRange(filters);
            this.Orders.AddRange(orders);
        }
        public Type ModelType { get; set; }
        private List<FilterCriteria> filters;
        public virtual List<FilterCriteria> Filters
        {
            get { if (filters == null) { filters = new List<FilterCriteria>(); } return filters; }
            set { filters = value; }
        }
        private List<OrderCriteria> orders;
        public virtual List<OrderCriteria> Orders
        {
            get { if (orders == null) { orders = new List<OrderCriteria>(); } return orders; }
            set { orders = value; ; }
        }

    }
}
